<?php
include ('class/config.php');
include ('class/cls_contact.php');
include ("class/cls_category.php");
include ("class/cls_university.php");
include ("class/cls_course.php");
include ("class/cls_story.php");

if (isset($_GET['catId'])) {
	$cat_id = $_GET['catId'];
	$resCounDetails = $objCategory -> getCategoryById($cat_id);
	$recCounDetails = mysqli_fetch_array($resCounDetails);

	$resUniversity = $objUniversity -> UniversityByCatId($cat_id);
	//$recUniversity=mysqli_fetch_array($resUniversity);

}
?>
<!doctype html>
<html class="no-js" lang="en">
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>Mission USA</title>
		<link rel="stylesheet" href="css/foundation.css" />
		<link rel="stylesheet" type="text/css" href="css/demo1.css" />
		<link rel="stylesheet" type="text/css" href="css/demo.css" />
		<link rel="stylesheet" type="text/css" href="css/style2.css" />
		<link rel="stylesheet" type="text/css" href="css/style.css" />
		<link rel="stylesheet" type="text/css" href="css/custom.css">

		<!--footer crousal script-->
		<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
		<script src="carouselengine/amazingcarousel.js"></script>
		<link rel="stylesheet" type="text/css" href="carouselengine/initcarousel-1.css">
		<script src="carouselengine/initcarousel-1.js"></script>
		<!--footer crousal script-->

		<script src="js/vendor/modernizr.js"></script>

		<script src="js/bjqs-1.3.min.js"></script>
		<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script>
		<script src="js/jquery.zaccordion.js"></script>
		<script type="text/javascript">
			$(document).ready(function() {
				$("pre.js").each(function(index) {
					eval($(this).text());
				});
			});
		</script>
	</head>
	</head>
	<body>

		<!--banner ends here-->

		<?php
	include ('includes/header.php');
 		?>
		<!--menu ends here-->

		<!--slider ends here-->

		<div class="row">
			<?php if(!isset($_GET['action']))
			{?>
			<article class="col">
				<h1><?php echo $recCounDetails['cat_name']; ?>
				Details</h1>
				<p>
					<?php echo $recCounDetails['cat_details']; ?>
				</p></br>
				<h1><?php echo $recCounDetails['cat_name'] . "'s"; ?>
				Universities List</h1>
				<?php
				while($recUniversity=mysqli_fetch_array($resUniversity)){
				?>
			<div class="product-holder">	
				<div class="product">
					<a href="?action=universityDetails&uId=<?php echo $recUniversity['university_id'];?>"><img src="uploads/university/<?php echo $recUniversity['university_image']; ?>" width="30" height="40" /></a>
				<div class="desc">	
				<p><a href="?action=universityDetails&uId=<?php echo $recUniversity['university_id']; ?>"><?php echo $recUniversity['university_name']; ?></a></p>
				</div> <!--desc-->
				</div> <!--product-->
			</div> <!--product-holder-->
				<?php } ?>
			</article>
			<?php }
				if(isset($_GET['action']) && $_GET['action']=='universityDetails')
				{
				$universityId=$_GET['uId'];
				$resDetails=$objUniversity->getUniversityById($universityId);
				$recDetails=mysqli_fetch_array($resDetails);
			?>
			<article class="col">
				<img src="uploads/university/<?php echo $recDetails['university_image']; ?>" />
				<h1><?php echo $recDetails['university_name']; ?>
				Details</h1>
				<p>
					<?php echo $recDetails['university_des']; ?>
			</article>
			<?php } ?>
		</div>

		<div class="row">
			<div class="large-8 columns">
				<div class="box">
					<div class="top">
						<div class="arrow-right"></div>
						<h4>Facilities</h4>
					</div>
					<ul>
						<li>
							<img src="img/internet.png" alt="internet">
							<p>
								Internet Facilities
							</p>
						</li>
						<li>
							<img src="img/library.png" alt="library" >
							<p>
								Library Facilities
							</p>
						</li>

						<li>
							<img src="img/parking.png" alt="parking">
							<p>
								Parking Facilities
							</p>
						</li>

						<li>
							<img src="img/lab.png" alt="Lab">
							<p>
								Well equipped computer lab
							</p>
						</li>
					</ul>
				</div>
			</div>
			<div class="large-4 columns">
				<div class="box">
					<div class="top">
						<div class="arrow-right"></div>
						<h4>News and Announcement</h4>
					</div>
					<p>
						is simply dummy text of the printing and typesetting industry. Lorem Ipsum
					</p>

					<p>
						is simply dummy text of the printing and typesetting industry. Lorem Ipsum
					</p>

				</div>
			</div>
		</div>

		<div class="divider"></div>
		<!--video and galleries ends here-->
		<div class="row">
			<div class="large-12 columns">
				<div class="box">
					<div class="top">
						<div class="arrow-right"></div>
						<h4>Visa Updates</h4>
					</div>
					<div style="margin:0px auto;">

						<!-- Insert to your webpage where you want to display the carousel -->
						<div id="amazingcarousel-container-1">
							<div id="amazingcarousel-1" style="display:block;position:relative;width:100%;max-width:720px;margin:0px auto 0px;">
								<div class="amazingcarousel-list-container">
									<ul class="amazingcarousel-list">
										<li class="amazingcarousel-item">
											<div class="amazingcarousel-item-container">
												<div class="amazingcarousel-image">
													<a href="images/0x600-lightbox.jpg" title="0x600"  class="html5lightbox" data-group="amazingcarousel-1"><img src="images/0x600.jpg"  alt="0x600" /></a>
												</div>
												<div class="amazingcarousel-title">
													0x600
												</div>
											</div>
										</li>
										<li class="amazingcarousel-item">
											<div class="amazingcarousel-item-container">
												<div class="amazingcarousel-image">
													<a href="images/2014-04-26-06.48.53-pm-lightbox.jpg" title="2014-04-26-06.48.53-pm"  class="html5lightbox" data-group="amazingcarousel-1"><img src="images/2014-04-26-06.48.53-pm.jpg"  alt="2014-04-26-06.48.53-pm" /></a>
												</div>
												<div class="amazingcarousel-title">
													2014-04-26-06.48.53-pm
												</div>
											</div>
										</li>
										<li class="amazingcarousel-item">
											<div class="amazingcarousel-item-container">
												<div class="amazingcarousel-image">
													<a href="images/10182653-lightbox.jpg" title="10182653"  class="html5lightbox" data-group="amazingcarousel-1"><img src="images/10182653.jpg"  alt="10182653" /></a>
												</div>
												<div class="amazingcarousel-title">
													10182653
												</div>
											</div>
										</li>
										<li class="amazingcarousel-item">
											<div class="amazingcarousel-item-container">
												<div class="amazingcarousel-image">
													<a href="images/Best-Movie-Tickets-Booking-sites-lightbox.jpg" title="Best-Movie-Tickets-Booking-sites"  class="html5lightbox" data-group="amazingcarousel-1"><img src="images/Best-Movie-Tickets-Booking-sites.jpg"  alt="Best-Movie-Tickets-Booking-sites" /></a>
												</div>
												<div class="amazingcarousel-title">
													Best-Movie-Tickets-Booking-sites
												</div>
											</div>
										</li>
									</ul>
									<div class="amazingcarousel-prev"></div>
									<div class="amazingcarousel-next"></div>
								</div>
								<div class="amazingcarousel-nav"></div>
								<div class="amazingcarousel-engine">
									<a href="http://amazingcarousel.com">JavaScript Image Scroller</a>
								</div>
							</div>
						</div>
						<!-- End of body section HTML codes -->

					</div>
				</div>
			</div>

		</div>

		<div class="divider"></div>
		<!--visa updates ends here-->

		<?php
	include ("includes/footer.php");
?>

		<script src="js/foundation.min.js"></script>
		<script>
			$(document).foundation();
		</script>

		<script type="text/javascript" src="js/jquery.cslider.js"></script>
		<script type="text/javascript">
			$(function() {

				$('#da-slider').cslider({
					autoplay : true,
					bgincrement : 450
				});

			});
		</script>

		<script class="secret-source">
			jQuery(document).ready(function($) {

				$('.banner-fade').bjqs({

					responsive : true
				});

			});
		</script>

		<script>
			$(document).ready(function() {
				$("#example4 ul").zAccordion({
					slideWidth : 537,
					width : 637,
					height : 250,
					timeout : 3000,
					slideClass : "frame"
				});
			});
		</script>

	</body>

</html>
